Skip to main content

Build Child Nodes

Let's continue to follow the tree diagram to build the remaining child nodes and you are very close to completing your first chatbot!

Sample tree diagram
Sample tree diagram

Child Nodes are the nodes that come after the first node and they can be in the second layer, the third layer or even the layers after. Users cannot access any Child Node if they are not on the designated path.

In the above example, "Opening Hours message" is the Child Node of "Do you want to check out the opening hours or shop address?" and can only be triggered when user clicks "Opening Hours".


What is your Result?

Display menu
Display menu
Check opening hours & address
Check opening hours & address
A complete conversation tree
A complete conversation tree
PropertyDescription
Successful Result
You will get a complete conversation tree graph on your workspace. There will be in total 5 tree nodes and 4 global nodes. You can also try your first chatbot in the testing environment!

You may also right click Save As to download a sample result tree here to cross check with your chatbot!


Getting Hands-on

Click here to start working in the Bot Builder.

Build 2nd-Layer Child Node: Check Menu

  1. Select your First Node User clicks Get Started and add a new tree node after it. Remember you must always select the Parent Node to create the child node that comes after.
Add Child Node
Add Child Node
  1. Go to "Node Inspector" and fill in the node details.
Fill in child node details
Fill in child node details
  1. Create a trigger that allows user to activate the check menu message. Remember the payload we set in Step 1.3? It's "CHECK_MENU".
Create trigger
Create trigger
  1. Create a response to display your restaurant menu. I would suggest to use Carousel as the message type because it looks a lot nicer.
Create new response
Create new response
  1. Click "+ Carousel" to add a new carousel item.
Add a carousel item
Add a carousel item
  1. Fill in the details new carousel item. Under Title, put down "Lunch Menu". Under Subtitle, put down "Available from 12pm to 2pm".

  2. Click "Choose from Media Library" to upload your carousel cover.

Fill in carousel item details
Fill in carousel item details
  1. A new window of Media Library will be opened. You can upload media files to be used on the chatbot here. Click "Upload a file".
Upload media files
Upload media files
  1. Another new window of Media Library Upload Window will be opened. Click the middle icon to select files and upload.
Select files to upload
Select files to upload
  1. Selected files will be displayed in a list view. Click "Upload" to upload all files at once.
Selected media files
Selected media files
  1. Select lunch-cover.jpg and click "Confirm".
Selected media files
Selected media files
  1. Once clicked confirm, the cover image will appear in the carousel item. Now, click "+ Button" to add a button to allow customers to click to view the lunch menu.
Successfully added lunch cove
Successfully added lunch cove
  1. Fill in the button details. Under Title, fill in "Click to read". Select Web URL as your button type.
Successfully added lunch cover
Successfully added lunch cover
  1. To find the URL of your lunch menu, go back to the Media Library window. Click on sample-menu.jpg and scroll down to find the URL. Copy the URL and paste it back in the carousel item.
Find menu URL
Find menu URL
  1. Now, repeat step 5, step 11 and step 14 to add another carousel item, select dinner-cover.jpg as the cover image and add back the dinner menu URL.

  2. Under Title, put down "Dinner Menu". Under Subtitle, put down "Available from 6pm to 10pm".

Fill in carousel item details
Fill in carousel item details
  1. Your menu carousel is done now. Check the message preview to see if it is set up properly. Click "Save" to save your carousel.
Menu carousel preview
Menu carousel preview
  1. Now, scroll down to "Save User Position" and check if it is toggled on.
Save user position
Save user position
Please note that this function is only applicable to core version v2.1 or above.
  1. Click "Save" to save your first child node.
Save menu node
Save menu node

Build 2nd-Layer Child Node: Shop Info

  1. Now you can follow the same steps and build your second child node: Shop Info.
Create second node
Create second node
  1. Create a trigger for "CHECK_SHOP_INFO".
Create CHECK_SHOP_INFO trigger
Create CHECK_SHOP_INFO trigger
  1. Create Quick Replies for the question "Do you want to check out the opening hours or shop address?".
Create quick replies for Shop Info question
Create quick replies for Shop Info question
Shop Info question
Shop Info question
  1. Add the quick reply buttons for OPENING_HOURS and SHOP_ADDRESS.
Opening hours quick reply
Opening hours quick reply
Shop address quick reply
Shop address quick reply
  1. Check your message preview for Shop Info quick reply. Click "Save" to save the response.
Shop Info message preview
Shop Info message preview
  1. Now, scroll down to "Save User Position" and check if it is toggled on. Then, click "Save" to save the second child node.
Save user position
Save user position
Please note that this function is only applicable to core version v2.1 or above.

Build 3rd-Layer Child Node: Opening Hours

  1. It's time to go on to the next layer. Repeat the same steps and build your third child node in the third layer: Opening Hours.
Create a third-layer noden
Create a third-layer noden
  1. Create a trigger for "OPENING_HOURS".
Create OPENING_HOURS trigger
Create OPENING_HOURS trigger
  1. Create a text response: "We are open from 8am to 11pm, 6 days in a week. We are closed on Wednesday."
Create Opening Hours text response
Create Opening Hours text response
  1. Now, scroll down to "Save User Position" and check if it is toggled on. Then, click "Save" to save the third child node.
Save user position
Save user position
Please note that this function is only applicable to core version v2.1 or above.

Build 3rd-Layer Child Node: Shop Address

  1. Similarly, repeat the same steps and build your fourth child node in the third layer: Opening Hours.
Create a third-layer node
Create a third-layer node
  1. Create a trigger for "SHOP_ADDRESS".
Create SHOP_ADDRESS trigger
Create SHOP_ADDRESS trigger
  1. Create a text response: "We are located at Kwun Tong, Hong Kong ๐Ÿ "
Create Shop Address text response
Create Shop Address text response
  1. Now, scroll down to "Save User Position" and check if it is toggled on. Then, click "Save" to save the fourth child node.
Save user position
Save user position
Please note that this function is only applicable to core version v2.1 or above.

Create Other Global Nodes

  1. Apart from adding payload trigger, you should also allow customers to type in certain keywords to trigger the relevant response. Let's do this by creating global nodes!

  2. Click "+ Global Node" to create a new global node for opening hours. Name is "Opening Hours Global".

Create Opening Hours global node
Create Opening Hours global node
  1. Create a keyword trigger for this global node. Under Keyword, put down "Opening Hours".
Create Opening Hours global node
Create Opening Hours global node
  1. Under Redirect, select the Opening Hours tree node. Click "Save" to save the global node.
Redirect to normal opening hours tree node
Redirect to normal opening hours tree node
  1. Repeat steps 30 to 34 to create another global child node: "Shop Address Global".
Create Shop Address Global node
Create Shop Address Global node
  1. Create a keyword trigger for this global node. Under Keyword, put down "address".
Create address keyword trigger
Create address keyword trigger
Shop Address global node
Shop Address global node
  1. Under Redirect, select the Shop Address tree node. Click "Save" to save the global node.
Redirect to normal shop address tree node
Redirect to normal shop address tree node

Add Global Nodes into Channels

  1. Now go back to your testing channel and add back the two additional global nodes into the channel. Click "Save" to save the settings
Add global nodes into the testing channel
Add global nodes into the testing channel
  1. You should now have all your child nodes set up properly. You have created your first bot! Check if you can get a successful result ๐ŸŽ‰